const fs = require('fs')
const path = require('path')
const filePath = path.join(__dirname, 'promise.all获取子分类.html')
fs.readFile(filePath, (err, data) => {
    let str = data.toString()
    str = str.replace(/[\r\n]/g, '')
    // console.log(str);
    const newFile = path.join(__dirname, 'newFile.html')
    fs.writeFile(newFile, str, err => {
        if (!err) {
            console.log('写入成功')
        }
        else {
            console.log(err);
        }
    })
})